<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<load href="__JS__/menu.js" />
<load href="__JS__/leftmenubar.js" />
<load href="__CSS__/header.css" />
<load href= "__JS__/jshelper.js" /> 
<load href="__CSS__/footer.css" />

	<title>课程管理</title>
		<load href= "__JS__/jshelper.js" /> 
			<script type="text/JavaScript">
				function courseedit(id){
					window.location.href="__URL__/courseedit/id/"+id;
				}
				function coursesearch(id){
					window.location.href="__URL__/coursedetail/id/"+id;
				}
				function coursedelete(id){
					if (confirm("你确定要删除吗")==true) 
						postwith('__URL__/coursedelete',{id:id});
				}
				function course(id)
				{
					postwith('__URL__/course',{id:id});
				}
				
				window.onload=show;
			</script>
</head>
<body>
<layout name="Auth:header" />
<div class="nowposition">
当前位置：
<a href='__APP__/index/index'  class="nowpositionhref">主页</a>>
<a href='__URL__/index' class="nowpositionhref">后台管理</a>>
<a href="__URL__/coursedetail"  class="nowpositionhref">课程管理</a>
</div>	
<layout name="Auth:leftmenu" />
<div class="coursedetail">
	<div align="left">
	<if condition="$role neq '教师'">	
		<a href="__URL__/courseadd" style="font-size:17px; text-decoration:none; color:blue; font-weight:bold;">添加课程</a>
		<a href="__URL__/courseapprove" style="font-size:17px; text-decoration:none; color:blue; font-weight:bold;">课程认证</a>
	</if>
	</div>
	<div align="left" style="margin-top:30px;">
		<form method="get" action="__URL__/coursedetail" >
			课程序号<input type="text" name="number">
			课程名称<input type="text" name="name">
			院系名称<select name="dname">
						<option value></option>						  
							<volist name='deplist' id='vo'>
								<option value =	{$vo.name}>{$vo.name}</option>
							</volist>
					</select>
			<input type="submit" onClick="coursesearch(id)" value="查询">
		</form>
	</div>
			<div id="course_Show">
				<table border="0" align="center" cellpadding="0px" cellspacing="0px">
					<thead  >
						<tr align="left" style="height:35px; background-color:#f0f0f0;">
							<td style="width:150px">课程序号</td>
							<td style="width:150px">课程名称</td>
							<td style="width:150px">所属院系</td>
							<td style="width:50px">操作</td>
						</tr>
					</thead>
	<load href"__PUBLIC__/js/list_show.js">
	<tbody id="tab" align="left">
	<volist name='list' id='vo' >
		<tr id="table_course_show" style="height:35px;">
		<td style="width:180px">{$vo.number}</td><!--院系名称-->
		<if condition="$vo.isselect neq 0">
			<td style="width:180px"><strong>{$vo.name} (已选择)</strong></td><!--课程名称-->
			<else/>
			<td style="width:180px">{$vo.name}</td><!--课程名称-->
		</if>
		
		<td style="width:180px">{$vo.dname}</td><!--院系名称-->
		<td style="display:none;">{$vo.id}</td><!--课程ID-->
		<td style="width:180px">
		<if condition="$vo.isselect eq 0">
			<a name="courseedit" onClick="course('{$vo.id}')" class="grey" href="#">选择</a>
			<!--<input type="button" name="courseedit"  onClick="course({$vo.id})" value="选择">-->
			<else/>
			<a name="courseedit" onClick="course('{$vo.id}')" class="fuchsia" href="#">取消</a>
			<!--<input type="button" name="courseedit"  onClick="course({$vo.id})" value="取消">-->
		</if>
				<if condition='$vo.select eq 1'>
					<a name="courseedit" onClick="courseedit('{$vo.id}')" class="blue" href="#">编辑</a>
				</if>
				<if condition="$role neq '教师'">
					<a name="delete_course" onClick="coursedelete('{$vo.id}')" class="red" style="color:red"  href="#">删除</a>				
				</if>
		</td></tr>
	</volist>
		
	</tbody>		
</table>

</div>
<div class="green-black" align="right" style="width:82%">{$page}</div>
</div>
</body>
</html>